package net.huashitong.ssydt.provider.exam.service;


import net.huashitong.ssydt.exam.entity.SsExamInfo;
import net.huashitong.ssydt.provider.exam.mapper.SsExamInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author huiyang.yu
 */
@Service
@Transactional
public class SsExamInfoServicempl implements SsExamInfoService {

    private SsExamInfoMapper ssExamInfoMapper;

    @Autowired
    public SsExamInfoServicempl(SsExamInfoMapper ssExamInfoMapper) {
        this.ssExamInfoMapper = ssExamInfoMapper;
    }

    @Override
    public SsExamInfo getByUserId(String userId) {
        return ssExamInfoMapper.getByUserId(userId);
    }

    @Override
    public void save(SsExamInfo ssExamInfo) {
        ssExamInfoMapper.insert(ssExamInfo);
    }

    @Override
    public void update(SsExamInfo ssExamInfo) {
        ssExamInfoMapper.updateByPrimaryKey(ssExamInfo);
    }
}
